package com.dyna.gateway.listener;

import com.alibaba.fastjson.JSON;
import com.dyna.constants.TopicConstant;
import com.dyna.gateway.domain.dto.OAuth2AccessTokenCheckRespDTO;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

@Component
public class RefreshTokenAccessListener {

    @KafkaListener(topics = TopicConstant.REFRESH_TOKEN_TOPIC, groupId = "group")
    public void refreshTokenAccess(String msg) {
        OAuth2AccessTokenCheckRespDTO dto = JSON.parseObject(msg, OAuth2AccessTokenCheckRespDTO.class);
        // TODO 刷新令牌
    }

}
